package com.tokenplus.thai.home.repo

import androidx.lifecycle.MutableLiveData
import com.tokenplus.thai.adata.coin.RevDataGetCoins
import com.tokenplus.thai.adata.user.RevDataGetUserAccount

object HomeCoinManager {
    //////////// 全局相关 //////////////
    //全局coinType
    val mGlobalCoinTypeLiveData = MutableLiveData<String>()
    fun updateGlobalCoinType(coinType: String?) {
        println(":updateGlobalCoinType$coinType")
        mGlobalCoinTypeLiveData.value = coinType
    }

    //全局mainCoinType
    val mGlobalMainCoinTypeLiveData = MutableLiveData<String>()
    fun updateGlobalMainCoinType(coinType: String?) {
        mGlobalMainCoinTypeLiveData.value = coinType
    }

    //全局coinAddress
    var mGlobalAddressLiveData = MutableLiveData<String>()
    fun updateGlobalAddress(address: String?) {
        mGlobalAddressLiveData.value = address
    }

    //全局coinName
    var mGlobalNameLiveData = MutableLiveData<String>()
    fun updateGlobalName(name: String?) {
        mGlobalNameLiveData.value = name
    }

    //全局coinName
    var mGlobalSymbolLiveData = MutableLiveData<String>()
    fun updateGlobalSymbol(symbol: String?) {
        mGlobalSymbolLiveData.value = symbol
    }

    //////////// home相关 //////////////
    //coins
    val mCoins: MutableList<RevDataGetCoins> = mutableListOf()

    //accounts
    val mAccounts: MutableList<RevDataGetUserAccount> = mutableListOf()
}